﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;

namespace mqtt_app
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }
        double PI = 3.14;
        double[] x = new double[90];
        double[] y = new double[90];
        
        private void Form3_Load(object sender, EventArgs e)
        {
            for(int i=1;i<90;i++)
            {
                x[i] = i;
                y[i] = Math.Sin(i/(2*PI));
            }
            ct1.Series[0].ChartType = SeriesChartType.Line;
            ct1.Series[0].Points.DataBindXY(x, y);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            string unicodeString = textBox1.Text;
            UTF8Encoding utf8 = new UTF8Encoding();
            Byte[] encodedBytes = utf8.GetBytes(unicodeString);
            Console.WriteLine(encodedBytes.ToString());
        }
    }
}
